<template>
    <div class="Shops">
        <div class="selector">
            <span>综合排序</span>
            <span>距离最近</span>
            <span>销售最高</span>
            <span>筛选</span>
        </div>
        <div class="activity">
            <span>年货节热卖</span>
            <span>津贴联盟</span>
            <span>销售最高</span>
            <span>品质联盟</span>
        </div>
        <div class="shopList" >
            <div class="shop" v-for="(item, index) in shopArr" :key="index">
                <div class="picture">
                    <img :src="item.pic" alt="pic">
                </div>
                <div class="info">
                    <div class="shopTitle">
                        <h3> {{item.shopName}} </h3>
                    </div>
                    <div class="sale">
                        <span>  {{item.evaluate}} </span>
                        <span>月销  {{item.monthSale}} </span>
                    </div>
                </div>
            </div>
        </div>


    </div>
</template>

<script>
    var picUrl_1 = '../assets/1.jpg';
    var picUrl_2 = '../assets/2.jpg';
    var picUrl_3 = '../assets/3.jpg';
    var picUrl_4 = '../assets/4.jpg';
export default {
    data() {
        return {
            shopArr:[
                {pic:picUrl_1, shopName:'金百万烤鸭', evaluate:4.3, monthSale:1045},
                {pic:picUrl_2, shopName:'稻香饺子馆', evaluate:5.0, monthSale:120},
                {pic:picUrl_3, shopName:'香辣火锅店', evaluate:2.8, monthSale:154},
                {pic:picUrl_4, shopName:'串串香', evaluate:7.5, monthSale:1263}
            ]

        }
    }

}
</script>

<style>
    .Shops {
        margin: 0px 10px 10px 10px;
    }
    .Shops .selector {
        display: flex;
        justify-content: space-between;
        font-weight: bolder;
        margin-bottom: 20px;
    }
    .Shops .activity {
        display: flex;
        justify-content: space-between;
    }
    .activity span {
        height: 34px;
        padding: 5px;
        text-align: center;
        line-height: 34px;
        background-color: gainsboro;
        border-radius: 5px;
    }
    .Shops .shopList {
        margin: 10px 10px 15px 10px;
    }
    .Shops .shop {
        height: 80px;
        display: flex;
        background-color: #fff;
        
    }
    .shop .picture {
        width: 25%;
        /* background-color: green; */

    }
    .picture img {
        width: 100%;
        height: 100%;
    }
    .shop .info {
        flex: 1;
    }
    .info .shopTitle {
        height: 40px;
        /* background-color: green; */
    }
    .shopTitle h3 {
        font-size: 20px;
        padding-left: 10px;
        line-height: 40px;
    }
    .info .sale {
        margin: 10px 0px 0px 10px ;
        /* background-color: skyblue; */
    }
    .sale span:nth-child(1) {
        margin-right: 5px;
        color: red;
    }
    .sale span:nth-child(2) { 
        color: #dbdbdb;
    }


</style>